package com.qf.controller;


import com.qf.service.GoodsService;
import com.qf.service.SortService;
import com.qf.utils.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sort")
public class SortController {
    @Autowired
    SortService sortService;

    @GetMapping("/selectBySortIdAndOne")//查询一级目录
    public ResultMsg selectBySortIdAndOne(){
        return sortService.selectBySortIdAndOne();
    }

    @GetMapping("/selectBySortIdAndTwo")//查询一级目录下对应的二级目录
    public ResultMsg selectBySortIdAndTwo(Integer sid){
        return sortService.selectBySortIdAndTwo(sid);
    }
}
